<template>
    <div class="body">
        <i class="iconfont icon-back back" v-show="!showhidden" @click="back">返回</i>
         <span>{{message}}</span>
    </div>
</template>


<script>
export default {
    
    props:{
        showhidden:{
            default:true,
            Type:Boolean
        },
        message:{
            default:'首页',
            Type:String
        }
    },
    methods:{
        back(){
            this.$router.push({ name: 'home' });
            this.$store.commit('changeState','home');
        }
    }
}

</script>


<style lang="scss" scoped>
    .body{
 overflow-x: hidden;
 width: 100%;
 margin: 0px;
  padding: 0px;
 background-color:rgb(186, 184, 178);
 height: 40px;
 .back{
    float: left;
    height: 10px;
    line-height: 40px;
 }
span{
    display: block;
    height: 5px;
    line-height: 40px;
    text-align: center;
    color: white;
}    
}


</style>